//package com.glp.work.flow.controller;
//
//import com.github.pagehelper.PageInfo;
//import com.glp.common.enums.ReturnEnum;
//import com.glp.common.reponse.BaseResponse;
//import com.glp.common.reponse.BaseResult;
//import com.glp.work.flow.constant.CodeFactorEnum;
//import com.glp.work.flow.exception.APIException;
//import com.glp.work.flow.request.WfFormDTO;
//import com.glp.work.flow.service.CodeService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @Description:
// * @Version:
// * @Author: whli
// * @CreateTime: 2020-05-07
// */
//@Api(tags = {"表单和模板id生成Controller"})
//@Slf4j
//@RequestMapping("/id")
//@RestController
//public class WfNewIdController {
//
//
//    @Autowired
//    private CodeService codeService;
//
//    /**
//     * 新增表单
//     *
//     * @param type 表单对象
//     * @return id
//     */
//    @ApiOperation(value = "表单模板id生成 流程传LC ，表单传BD")
//    @GetMapping(value = "/get")
//    public BaseResult queryFormList(String type) {
//        try {
////            String generate = codeService.generateWithDigits(CodeFactorEnum.valueOf(type).name(),6);
//            return BaseResponse.success(generate);
//        } catch (APIException e) {
//            log.error("表单模板id生成,APIException", e);
//            return e.parse();
//        } catch (Exception e) {
//            log.error("表单模板id生成,Exception", e);
//            return BaseResponse.error(ReturnEnum.ERROR);
//        }
//    }
//}
